package org.hugoduncan.appam.server.impl;

import java.io.IOException;
import javax.servlet.ServletException;

import org.hugoduncan.appam.server.AppServletRequest;
import org.hugoduncan.appam.server.AppServletResponse;
import org.hugoduncan.appam.server.PathHandler;
import org.hugoduncan.appam.server.RequestHandler;

public class RequestHandlerImpl 
    implements RequestHandler
{
    private PathHandler pathHandler;

    public void setPathHandler(PathHandler pathHandler)
    {
        this.pathHandler=pathHandler;
    }

    public boolean service(AppServletRequest request,
                           AppServletResponse response)
            throws ServletException, IOException
    {
        return pathHandler.process(request, response);
    }
}
